#pragma once


class array
{
    typedef int data_type;
public:
    explicit array   (size_t size);
    array   (const array& arr);
    array&  operator=   (const array& arr);
    ~array   ();
    
    data_type   get         (size_t index) const;
    void        set         (size_t index, data_type value);
    void        push_back   (data_type value);
    
    size_t size() const;

    void swap   (array& arr);
private:
    void resize ();

    data_type   *ptr_;
    size_t      size_;
    size_t      capacity_;

    const static float COEF;
};

